package openbang.common.vo;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * 数据连接的属性
 * 参考java.sql.DatabaseMetaData能提供的属性。
获取jdbc连接后，由jdbc驱动提供。

 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DataBaseMeta implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	/**
	 * 用户自己定义的名称
	 */
	@Persistent
	private String niceName="";

	@Persistent
	private String url="";

	@Persistent
	private String user="";

	@Persistent
	private String pwd="";
	
	@Persistent
	private boolean autoConnect =false;
	
	@NotPersistent
	private String dbProdName="";	
	
	@NotPersistent
	private String dbProdVer="";	

	@NotPersistent
	private String driverName="";	
	
	@NotPersistent
	private String driverVer="";	

	@NotPersistent
	private List<String> schemaList= new ArrayList<String>();	
	
	@Persistent
	private String remark="";

	@Persistent
	private Integer status=StatusEnum.PENDING_VERIFY.getCode();

	@Persistent
	private Date regTime=new Date();

	
	@Persistent
	private Date updTime=new Date();

	
    public DataBaseMeta() {
    }


	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
}